package com.reflect;

import java.lang.reflect.Array;

/**
 * DynamicArrayTest--bdqnPractice
 *
 * @author: Jovi
 * @createTime: 2017-08-02 13:48
 **/
public class DynamicArrayTest {

    public static void main(String[] args) {
        Object arr = Array.newInstance(int.class, 2);

        Array.set(arr, 0, 12);
        Array.set(arr, 1, 13);

        Object o1 = Array.get(arr, 0);
        Object o2 = Array.get(arr, 1);

        System.out.println(o1);
        System.out.println(o2);
    }
}
